package com.csust.zerocode.core.handler;

import com.csust.zerocode.model.entity.User;
import com.csust.zerocode.service.ChatHistoryService;
import reactor.core.publisher.Flux;

/**
 * @ ClassName StreamHandler
 * @ Description TODO
 * @ Author 钰玟
 * @ Date 2025/9/12 下午10:00
 * Version 1.0
 **/

public interface StreamHandler {
    /**
     * 处理流
     * @param originFlux 原始流
     * @param chatHistoryService 聊天历史服务
     * @param appId 应用ID
     * @param loginUser 登录用户
     * @return 处理后的流
     */
    Flux<String> handle(Flux<String> originFlux,
                        ChatHistoryService chatHistoryService,
                        long appId, User loginUser);
}
